import common from "../../lib/common/common.js";
import fs from "fs";
import { segment } from "oicq";
const _path = process.cwd();
const basePath = `/root/TRSS_AllBot/TRSS-Yunzai/plugins/mora-plugin/data`;
const atlasPath = `/root/TRSS_AllBot/TRSS-Yunzai/plugins/Atlas`;
export class xinxi extends plugin {
    constructor() {
        super({
            name: "自写攻略",
            dsc: "",
            event: "message",
            priority: 50,
            rule: [
                {
                    reg: "(瓦(雷|蕾)(莎|沙|砂))(攻略|配对|配队)$",
                    fnc: "gs1"
                },
                {
                    reg: "((伊|依)安(珊|姗|栅|鳝))(攻略|配对|配队)$",
                    fnc: "gs2"
                },
                {
                    reg: "(万(敌|迪|帝))(攻略|配对|配队)$",
                    fnc: "sr1"
                },
                {
                    reg: "((遐|夏|暇|瑕|霞)(蝶|碟|牒)|蝶宝|召紫龙|长衫召紫龙|那刻夏)(攻略|配对|配队)$",
                    fnc: "sr2"
                },
                {
                    reg: "(银心锡兵·安比|银心锡兵安比|大安比|安比pro|安比+|安比plus|银心安比|零号·安比)(攻略|配对|配队)$",
                    fnc: "zzz1"
                },
                {
                    reg: "(波可(娜|那|呐|纳|哪))(攻略|配对|配队)$",
                    fnc: "zzz2"
                },        

            ]
        })
    }

    async gs1(e) {
    
        let textMessage1 = `攻略图库(包含该js)  https://gitee.com/mingdiandianzhu/data`;
        let imagePaths = [
            `${basePath}/未来材料/gi.jpg`,
            `${atlasPath}/Genshin-Atlas/material for role/瓦雷莎.png`,

            `${basePath}/roleGuides/HoYo青枫/瓦雷莎.jpg`,
            `${basePath}/roleGuides/Asgater/瓦雷莎.jpg`,
            `${basePath}/roleGuides/荧岁镇太辰/瓦雷莎.jpg`,
            `${basePath}/roleGuides/OH是姜姜呀/瓦雷莎.jpg`,
            `${basePath}/roleGuides/猫冬/瓦雷莎.jpg`,
    
            `${basePath}/体验服攻略合集/HoYo青枫/瓦雷莎.jpg`,
            `${basePath}/体验服攻略合集/Asgater/瓦雷莎.jpg`,
            `${basePath}/体验服攻略合集/荧岁镇太辰/瓦雷莎.jpg`,
            `${basePath}/体验服攻略合集/OH是姜姜呀/瓦雷莎.jpg`,
            `${basePath}/体验服攻略合集/猫冬/瓦雷莎.jpg`
        ];
    
        let msg = [];
        msg.push(segment.text(textMessage1));
        for (let path of imagePaths) {
            if (fs.existsSync(path)) {
                msg.push(segment.image(path));
            }
        }
    
        if (msg.length > 1) await this.reply(common.makeForwardMsg(e, msg, `瓦雷莎攻略  来啦~  \n（本攻略由自写小js提供）`));
        return true;
    }

    async gs2(e) {

        let textMessage1 = `攻略图库(包含该js)  https://gitee.com/mingdiandianzhu/data`;
        let imagePaths = [
            `${basePath}/未来材料/gi.jpg`,
            `${atlasPath}/Genshin-Atlas/material for role/伊安珊.png`,

            `${basePath}/roleGuides/HoYo青枫/伊安珊.jpg`,
            `${basePath}/roleGuides/Asgater/伊安珊.jpg`,
            `${basePath}/roleGuides/荧岁镇太辰/伊安珊.jpg`,
            `${basePath}/roleGuides/OH是姜姜呀/伊安珊.jpg`,
            `${basePath}/roleGuides/猫冬/伊安珊.jpg`,

            
            `${basePath}/体验服攻略合集/HoYo青枫/伊安珊.jpg`,
            `${basePath}/体验服攻略合集/Asgater/伊安珊.jpg`,
            `${basePath}/体验服攻略合集/荧岁镇太辰/伊安珊.jpg`,
            `${basePath}/体验服攻略合集/OH是姜姜呀/伊安珊.jpg`,
            `${basePath}/体验服攻略合集/猫冬/伊安珊.jpg`
        ];

        let msg = [];
        msg.push(segment.text(textMessage1));
        for (let path of imagePaths) {
            if (fs.existsSync(path)) {
                msg.push(segment.image(path));
            }
        }

        if (msg.length > 1) await this.reply(common.makeForwardMsg(e, msg, `伊安珊攻略  来啦~  \n（本攻略由自写小js提供）`));
        return true;
    }

    async sr1(e) {

        let textMessage1 = `攻略图库(包含该js)  https://gitee.com/mingdiandianzhu/data`;
        let imagePaths = [
            `${basePath}/未来材料/sr.jpg`,
            `${atlasPath}/star-rail-atlas/guide for role/万敌.png`,

            `${basePath}/roleGuides/OH是姜姜呀/StarRail/万敌.jpg`,
            `${basePath}/roleGuides/Asgater/StarRail/万敌.jpg`,
            `${basePath}/roleGuides/紫喵Azunya/StarRail/万敌.jpg`,
            `${basePath}/roleGuides/HoYo青枫/StarRail/万敌.jpg`,
            `${basePath}/roleGuides/让我摸个鱼吧Moyu/StarRail/万敌.jpg`,
            `${basePath}/roleGuides/星穹中心/StarRail/万敌.jpg`,
            `${basePath}/roleGuides/祈鸢ya/StarRail/万敌.jpg`,
            `${basePath}/roleGuides/小橙子阿/StarRail/万敌.jpg`,

            `${basePath}/体验服攻略合集/OH是姜姜呀/StarRail/万敌.jpg`,
            `${basePath}/体验服攻略合集/Asgater/StarRail/万敌.jpg`,
            `${basePath}/体验服攻略合集/紫喵Azunya/StarRail/万敌.jpg`,
            `${basePath}/体验服攻略合集/HoYo青枫/StarRail/万敌.jpg`,
            `${basePath}/体验服攻略合集/让我摸个鱼吧Moyu/StarRail/万敌.jpg`,
            `${basePath}/体验服攻略合集/星穹中心/StarRail/万敌.jpg`,
            `${basePath}/体验服攻略合集/祈鸢ya/StarRail/万敌.jpg`,
            `${basePath}/体验服攻略合集/小橙子阿/StarRail/万敌.jpg`
        ];

        let msg = [];
        msg.push(segment.text(textMessage1));
        for (let path of imagePaths) {
            if (fs.existsSync(path)) {
                msg.push(segment.image(path));
            }
        }

        if (msg.length > 1) await this.reply(common.makeForwardMsg(e, msg, `万敌攻略  来啦~  \n（本攻略由自写小js提供）`));
        return true;
    }

    async sr2(e) {

        let textMessage1 = `攻略图库(包含该js)  https://gitee.com/mingdiandianzhu/data`;
        let imagePaths = [
            `${basePath}/未来材料/sr.jpg`,
            `${atlasPath}/star-rail-atlas/guide for role/guide for role/遐蝶.png`,

            `${basePath}/roleGuides/OH是姜姜呀/StarRail/遐蝶.jpg`,
            `${basePath}/roleGuides/Asgater/StarRail/遐蝶.jpg`,
            `${basePath}/roleGuides/紫喵Azunya/StarRail/遐蝶.jpg`,
            `${basePath}/roleGuides/HoYo青枫/StarRail/遐蝶.jpg`,
            `${basePath}/roleGuides/让我摸个鱼吧Moyu/StarRail/遐蝶.jpg`,
            `${basePath}/roleGuides/星穹中心/StarRail/遐蝶.jpg`,
            `${basePath}/roleGuides/祈鸢ya/StarRail/遐蝶.jpg`,
            `${basePath}/roleGuides/小橙子阿/StarRail/遐蝶.jpg`,

            `${basePath}/体验服攻略合集/OH是姜姜呀/StarRail/遐蝶.jpg`,
            `${basePath}/体验服攻略合集/Asgater/StarRail/遐蝶.jpg`,
            `${basePath}/体验服攻略合集/紫喵Azunya/StarRail/遐蝶.jpg`,
            `${basePath}/体验服攻略合集/HoYo青枫/StarRail/遐蝶.jpg`,
            `${basePath}/体验服攻略合集/让我摸个鱼吧Moyu/StarRail/遐蝶.jpg`,
            `${basePath}/体验服攻略合集/星穹中心/StarRail/遐蝶.jpg`,
            `${basePath}/体验服攻略合集/祈鸢ya/StarRail/遐蝶.jpg`,
            `${basePath}/体验服攻略合集/小橙子阿/StarRail/遐蝶.jpg`
        ];

        let msg = [];
        msg.push(segment.text(textMessage1));
        for (let path of imagePaths) {
            if (fs.existsSync(path)) {
                msg.push(segment.image(path));
            }
        }

        if (msg.length > 1) await this.reply(common.makeForwardMsg(e, msg, `遐蝶攻略  来啦~  \n（本攻略由自写小js提供）`));
        return true;
    }

    async zzz1(e) {

        let textMessage1 = `攻略图库(包含该js)  https://gitee.com/mingdiandianzhu/data`;
        let imagePaths = [
            `${basePath}/未来材料/zzz.jpg`,
            `${atlasPath}/zzz-atlas/material for role/零号·安比.jpg`,
            
            `${basePath}/roleGuides/OH是姜姜呀/ZenlessZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/roleGuides/Asgater/ZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/roleGuides/紫喵Azunya/ZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/roleGuides/HoYo青枫/ZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/roleGuides/小橙子阿/ZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/roleGuides/猫冬/ZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/roleGuides/新艾利都快讯/ZenlessZoneZero/零号·安比.jpg`,

            `${basePath}/体验服攻略合集/OH是姜姜呀/ZenlessZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/体验服攻略合集/Asgater/ZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/体验服攻略合集/紫喵Azunya/ZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/体验服攻略合集/HoYo青枫/ZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/体验服攻略合集/小橙子阿/ZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/体验服攻略合集/猫冬/ZenlessZoneZero/零号·安比.jpg`,
            `${basePath}/体验服攻略合集/新艾利都快讯/ZenlessZoneZero/零号·安比.jpg`
        ];

        let msg = [];
        msg.push(segment.text(textMessage1));
        for (let path of imagePaths) {
            if (fs.existsSync(path)) {
                msg.push(segment.image(path));
            }
        }

        if (msg.length > 1) await this.reply(common.makeForwardMsg(e, msg, `零号·安比攻略  来啦~  \n（本攻略由自写小js提供）`));
        return true;
    }

    async zzz2(e) {

        let textMessage1 = `攻略图库(包含该js)  https://gitee.com/mingdiandianzhu/data`;
        let imagePaths = [
            `${basePath}/未来材料/zzz.jpg`,
            `${atlasPath}/zzz-atlas/material for role/波可娜.jpg`,

            `${basePath}/roleGuides/OH是姜姜呀/ZenlessZenlessZoneZero/波可娜.jpg`,
            `${basePath}/roleGuides/Asgater/ZenlessZoneZero/波可娜.jpg`,
            `${basePath}/roleGuides/紫喵Azunya/ZenlessZoneZero/波可娜.jpg`,
            `${basePath}/roleGuides/HoYo青枫/ZenlessZoneZero/波可娜.jpg`,
            `${basePath}/roleGuides/小橙子阿/ZenlessZoneZero/波可娜.jpg`,
            `${basePath}/roleGuides/猫冬/ZenlessZoneZero/波可娜.jpg`,
            `${basePath}/roleGuides/新艾利都快讯/ZenlessZoneZero/波可娜.jpg`,

            `${basePath}/体验服攻略合集/OH是姜姜呀/ZenlessZenlessZoneZero/波可娜.jpg`,
            `${basePath}/体验服攻略合集/Asgater/ZenlessZoneZero/波可娜.jpg`,
            `${basePath}/体验服攻略合集/紫喵Azunya/ZenlessZoneZero/波可娜.jpg`,
            `${basePath}/体验服攻略合集/HoYo青枫/ZenlessZoneZero/波可娜.jpg`,
            `${basePath}/体验服攻略合集/小橙子阿/ZenlessZoneZero/波可娜.jpg`,
            `${basePath}/体验服攻略合集/猫冬/ZenlessZoneZero/波可娜.jpg`,
            `${basePath}/体验服攻略合集/新艾利都快讯/ZenlessZoneZero/波可娜.jpg`
        ];

        let msg = [];
        msg.push(segment.text(textMessage1));
        for (let path of imagePaths) {
            if (fs.existsSync(path)) {
                msg.push(segment.image(path));
            }
        }

        if (msg.length > 1) await this.reply(common.makeForwardMsg(e, msg, `波可娜攻略  来啦~  \n（本攻略由自写小js提供）`));
        return true;
    }
}
